package ch03.test.test3_2;

import net.sf.cglib.proxy.Enhancer;

public class InterProxyFactory {
    private static Interptor callback=new Interptor();

    public static <T>T create(Class<T> target){
        Enhancer enhancer=new Enhancer();
        enhancer.setCallback(callback);
        enhancer.setSuperclass(target);
        return (T)enhancer.create();
    }

}
